package com.va.yahooweather.entity;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;

public class YWind {
    private int chill;
    private int direction;
    private double speed;

    public int getChill() {
        return chill;
    }

    public void setChill(int chill) {
        this.chill = chill;
    }

    public int getDirection() {
        return direction;
    }

    public void setDirection(int direction) {
        this.direction = direction;
    }

    public double getSpeed() {
        return speed;
    }

    public void setSpeed(double speed) {
        this.speed = speed;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (obj == null || getClass() != obj.getClass()) {
            return false;
        }
        
        if (this == obj) {
            return true;
        }
        
        YWind target = (YWind) obj;
        return new EqualsBuilder()
            .append(getChill(), target.getChill())
            .append(getDirection(), target.getDirection())
            .append(getSpeed(), target.getSpeed())
            .isEquals();
    }

    @Override
    public int hashCode() {
        HashCodeBuilder h = new HashCodeBuilder(3, 41);
        h.append(getChill());
        h.append(getDirection());
        h.append(getSpeed());
        return h.hashCode();
    }

    
}
